
  tinyMCE.init({
    mode : "textareas",
    theme : "advanced",
    plugins : "spellchecker,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,zoom,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras",
    theme_advanced_buttons1 : "bold,italic,underline,strikethrough,separator,justifyleft,justifycenter,justifyright,justifyfull,separator,cut,copy,paste,pastetext,pasteword,separator,search,replace,separator",
	theme_advanced_buttons2 : "fontselect,fontsizeselect",
	theme_advanced_buttons3 : "emotions,iespell,separator,print,separator,ltr,rtl,separator,forecolor,backcolor,saparator,link,unlink",
    theme_advanced_toolbar_location : "top",
    theme_advanced_toolbar_align : "left",
    content_css : "/example_data/example_full.css",
      plugin_insertdate_dateFormat : "%Y-%m-%d",
      plugin_insertdate_timeFormat : "%H:%M:%S",
    extended_valid_elements : "hr[class|width|size|noshade],font[face|size|color|style],span[class|align|style]",
    external_link_list_url : "example_data/example_link_list.js",
    external_image_list_url : "example_data/example_image_list.js",
    flash_external_list_url : "example_data/example_flash_list.js",
    file_browser_callback : "mcFileManager.filebrowserCallBack",
    theme_advanced_resize_horizontal : false,
    theme_advanced_resizing : true,
    apply_source_formatting : true,
    spellchecker_languages : "+Portuguese=pt",
	editor_deselector : "mceNoEditor"
  });

  function menu(obj){
    var uls = null, menu = null, lis = null, li = null,aHg = null, ul = null, oHg = null, img = null;
    ul = obj.parentNode.parentNode.parentNode;
    lis = ul.getElementsByTagName('li');
    if(lis[1].style.display == ''){
      aHg = lis[1].style.height;
      esconde(lis[1].id, parseInt(aHg), parseInt(aHg) );

      img = lis[0].getElementsByTagName('img');
    
      for(i=0;i < img.length; i++){
        if(img[i].name == 'direcao'){
          img[i].src = 'imagens/layout/botao_seta_baixo.gif';
        }
      }
      return true;
    }else{
      img = lis[0].getElementsByTagName('img');
      for(i=0;i < img.length; i++){
        if(img[i].name == 'direcao'){
          img[i].src = 'imagens/layout/botao_seta_cima.gif';
        }
      }
      li = lis[1];
      oHg =  parseInt(li.style.height);
      li.style.height = '0px';
      li.style.overflow = 'hidden';
      li.style.display = '';
      mostra( li.id , 0, oHg);
      uls = document.getElementsByTagName('ul')
      for(i=0;i < uls.length; i++){
        if(uls[i].className == 'menu'){
          menu = uls[i];
          if(menu.id != ul.id){
            lis = menu.getElementsByTagName('li');
            img = lis[0].getElementsByTagName('img');
            for(j=0;j < img.length; j++){
              if(img[j].name == 'direcao'){
                img[j].src = 'imagens/layout/botao_seta_baixo.gif';
              }
            }
            li = lis[1];
            if(li != undefined){
            	aHg = li.style.height;
            	esconde(li.id, parseInt(aHg), parseInt(aHg) );
            }
          }
        }
      }
    }
  }
  
  function mostra(id,i,m){
    var obj = document.getElementById(id);
    if(i < m){
      obj.style.height = i+'px';
      setTimeout('mostra(\''+ id +'\','+ (i * 1.2 + 1) +', '+ m +')', 3 );
    }else{
      obj.style.height = m+'px';
    }
  }
  
  function esconde(id,i, old){
    var obj = document.getElementById(id);
    if(i > 0){
      obj.style.height = i+'px';
      setTimeout('esconde(\''+ id +'\','+ (i * 0.8 - 1) +', '+old+')', 3 );
    }else{
      obj.style.display = 'none';
      obj.style.height = old+'px';
    }
  }